WebInput.NET is using standard .NET formatting feature, so it has a solid formatting base that exposes much .NET formatting features including format expression, validation, separator and standard format.
The formatting lets WebInput.NET to format and validate the display text data according to supplied format expression and it is represented by DisplayFormat property of WebInput.NET.
Formatting in WebInput.NET modes:
- Basic Mode
There is no formatting applied.
- Display Mode
- The display text is not same as the edit text.
- The display text is the validated and formatted text.
- The edit text is the actual text representation of value
- Validate and format the displayed text with DisplayFormat.Format expression.
- Edit Mode
- The display text is same as the edit text.
- The display text and the edit text are the masked, validated and formatted text.
- Validate, format and spin the edited text with EditFormat.Format expression. The format expression (EditFormat.Format property) must be synchronized (correct in string length , position and meaning) with the masking expression (EditFormat.MaskInfo.MaskExpression property).
- Display and Edit Mode
- The display text is not same as the edit text.
- The display text is the validated and formatted text.
- The edit text is the masked, validated and formatted text.
- Validate and format the displayed text with DisplayFormat.Format expression.
- Validate, format and spin the edited text with EditFormat.Format expression. The format expression (EditFormat.Format property) must be synchronized (correct in string length and position) with the masking expression (EditFormat.MaskInfo.MaskExpression property).
Formatting process sequences :
- Basic Mode
There is no process applied.
- Display mode
When the control is initially loaded at client side, the display text is already formatted. Then, when the control receives focus (activate) the display text is validated and unformatted (using original value string representation). After the control text is edited (the control became inactive - release focus - blur), the edited text is validated and formatted again (become control display text).
- Edit mode
When the control is initially loaded at client side, the display text is already formatted and masked. Each character input is validated according its position. After the control text is edited (the control became inactive - release focus - blur), the edited text is validated and formatted.
- Display and Edit Mode
When the control is initially loaded at client side, the display text is already formatted. Then, when the control receives focus (activate) the edited text is showed. Each character input is validated according its position. After the control text is edited (the control became inactive - release focus - blur), the edited text is validated and formatted again (become control display text).
![]() |
Format expression is different from mask expression. |
![]() |
The display text : control text when control has no focus (deactivated - blur). The edit text : control text when control value is edited (control has focused). |
- Numeric
Standard format specifier
C or c - Currency
D or d - Decimal
E or e - Scientific
F or f - Fixed-point
G or g - General
N or n - Number
P or p - Percent
Custom format character
0 - Zero placeholder
# - Digit placeholder
. - Decimal point
, - Thousand separator and number scaling
% - Percentage placeholder
E0, E+0, E-0, e0, e+0, e-0 - Scientific notation
; - Section separator
Other - all other Character
- DateTime
Standard format specifier
d - Short date pattern
D - Long date pattern
t - Short time pattern
T - Long time pattern
f - Full date/time pattern (short time)
F - Full date/time pattern (long time)
g - General date/time pattern (short time)
G - General date/time pattern (long time)
M or m - month day pattern
Y or y - Year month pattern
Custom format character
d
f
g
h
H
m
M
s
t
y
z
:
/
any other character
UnSupported .NET format expressions.
- Numeric
Standard format specifier
R or r - Round-trip
X or x - Hexadecimal
Custom format character
\ - Escape character
'ABC' or "ABC" - Literal string
- DateTime
Standard format specifier
R or r - RFC1123 pattern
s - sortable date/time pattern; conforms to ISO 8601
U or u - Universal sortable date/time pattern
Any other single character - Unknown specifier
Custom format character
"
'
%c
\c
In This Section
How-to: Use DateTime display formatting
How-to: Use DateTime edit formatting
How-to: Combine DateTime display and edit formatting
How-to: Use numeric display formatting
How-to: Use numeric edit formatting
How-to: Combine numeric display and edit formatting